package org.bonorsoft.modules.control.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.bonorsoft.common.system.vo.Ztree;
import org.bonorsoft.modules.control.entity.Hazard;

import java.util.List;

public interface IHazardService extends IService<Hazard> {
    String checkHazardNameUnique(Hazard hazard);

    List<Ztree> selectHazardTree();

    /**
     * 重写添加逻辑
     * @param hazard
     * @return
     */
    boolean save(Hazard hazard);

    /**
     * 修改信息
     * @param hazard
     */
    boolean updateHazard(Hazard hazard);

    Integer selectCountHazardByParentId(Long hazardId);
}
